package com.neu.demo02.service;

import com.neu.demo02.dto.BookDto;
import com.neu.demo02.mapper.BookMapper;
import com.neu.demo02.po.Book;
import com.neu.demo02.util.CommonResult;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BookService {

    @Resource
    private BookMapper bookMapper;
    public CommonResult findByParam(BookDto dto) {
        CommonResult rst=new CommonResult();
        List<Book> books=bookMapper.findByParam(dto);
        rst.setRst(books);
        return rst;
    }
}
